package com.wuseguang.springcloud.mina;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class ByteModleCodecFactory implements ProtocolCodecFactory {



    private ByteModleDecoder decoder;
    private ByteModleEncoder encoder;


    public ByteModleCodecFactory() {
        encoder = new ByteModleEncoder();
        decoder = new ByteModleDecoder();
    }


    @Override
    public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception {
        return encoder;
    }

    @Override
    public ProtocolDecoder getDecoder(IoSession ioSession) throws Exception {
        return decoder;
    }
}
